Skip to content

Enhance conversational features, file handling, and UI improvements#20

Merged
hoangsonww merged 9 commits intomasterfrom
feat/enhance-repl-cli-ui
Apr 24, 2026
Merged

Enhance conversational features, file handling, and UI improvements#20
hoangsonww merged 9 commits intomasterfrom
feat/enhance-repl-cli-ui

Conversation

@hoangsonww
Copy link
Copy Markdown
Owner

This pull request introduces a Makefile to the project, improves documentation around installation, system requirements, and model capabilities, and clarifies the project's positioning as "plan-first" and local-first. The changes aim to streamline developer workflows, make system requirements explicit, and guide users in selecting appropriate models for different tasks.

Key changes include:


Developer Tooling

  • Added a comprehensive, self-documenting Makefile that wraps common npm, Docker, and utility commands, providing short aliases, grouped help, and idempotent recipes for building, testing, running, and maintaining the project. This is intended as a developer convenience layer over package.json scripts and Docker, not as the canonical build system.

Documentation Improvements

  • Updated README.md and docs/INSTALL.md to include a detailed "System requirements" section, specifying Node.js, OS, RAM, disk, Docker, and model source requirements, as well as recommended (but optional) dependencies like ripgrep and git. [1] [2]
  • Enhanced documentation in README.md and docs/ARCHITECTURE.md to clarify the minimum model capabilities required for various tasks, including a table mapping model size/type to supported workflows and failure modes, with explanations of runtime guards that prevent silent failures when using smaller models. [1] [2]

Project Positioning and Clarity

  • Updated project tagline and descriptions throughout README.md and related docs to emphasize "plan-first" in addition to "local-first", clarifying Forge's unique approach and differentiating it from hosted assistants. [1] [2]
  • Improved links in README.md to point to the correct documentation locations on GitHub and the project wiki.

Minor Documentation Cleanup

  • Removed unnecessary HTML tags from RELEASES.md for a cleaner appearance.
  • Added a "System requirements" entry to the table of contents in docs/INSTALL.md.

These changes collectively make the project more accessible to new contributors, clarify what is needed to run and develop Forge, and help users select the right models for their workflows.

…tool/test handling

- Implement conversational task fast-path: direct model response for pure questions, bypassing plan/approval/execute/review pipeline
- Add per-process file mutex and atomic write primitives to prevent concurrent file-edit/write races
- Update write_file and edit_file tools to use atomic writes and file locking
- Enhance classifier with looksConversational heuristic and tests
- Update reviewer to handle analysis/informational tasks without requiring file changes
- Improve run-tests tool: auto-detect node:test, prefer npm when both present
- Refine permission manager to honor cached grants for execute/network tools
- Add streaming model delta events for real-time UI updates
- Improve markdown rendering for inline code fences
- Update planner and executor prompts for more precise tool mapping and file operation guidance
- Bump package version to 0.1.2 and update install scripts for new package name
- Add and update tests for new behaviors and edge cases
- Refine styles for streaming log lines and conversation follow-up input in UI
…streaming, and robust path handling

- Add launch banner and progress breadcrumbs to REPL for parity with CLI
- Refine completion and error summary rendering for consistent UX across surfaces
- Improve markdown renderer: renumber ordered lists, normalize inline code fences, and handle indented code blocks
- Expand tilde (~) in user-supplied paths for file operations and UI directory picker
- Add /api/dir endpoint for safe directory browsing in UI, confined to $HOME
- Support inline plan editing in interactive hosts (UI plan editor)
- Ensure consistent task IDs between orchestrator and UI runner for reliable event streaming
- Replay model deltas to late WebSocket subscribers for seamless live streaming
- Update styles for log lines, markdown, directory picker, and chat bubbles for improved readability and UX
- Add live demo section to documentation with video showcases of REPL, CLI, and UI
@hoangsonww hoangsonww self-assigned this Apr 24, 2026
@hoangsonww hoangsonww added bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request good first issue Good for newcomers question Further information is requested labels Apr 24, 2026
@hoangsonww hoangsonww added the feature Feature request label Apr 24, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces significant enhancements to the Forge runtime, including a conversation fast-path for general Q&A, a narrator agent for analysis tasks, and model "warming" to hide cold-load latency. It also adds robust file-locking and atomic-write primitives to prevent race conditions. The Web UI and CLI now support live streaming of model output and improved markdown rendering. Feedback identifies a potential character corruption issue in the streaming logic of the Anthropic, Ollama, and OpenAI providers when handling multi-byte UTF-8 characters, and suggests expanding markdown fence detection in the progress display to include tildes.

Comment thread src/models/anthropic.ts
let outputTokens: number | undefined;
let finishReason: 'stop' | 'length' = 'stop';

for await (const chunk of res.body as AsyncIterable<Buffer>) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using chunk.toString('utf8') on stream chunks can lead to character corruption if a multi-byte UTF-8 character is split across chunk boundaries. It is recommended to use TextDecoder with the stream: true option to correctly handle partial characters.

Comment thread src/models/ollama.ts
let finishReason: 'stop' | 'length' = 'stop';

for await (const chunk of res.body as AsyncIterable<Buffer>) {
buffer += chunk.toString('utf8');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using chunk.toString('utf8') on stream chunks can lead to character corruption if a multi-byte UTF-8 character is split across chunk boundaries. It is recommended to use TextDecoder with the stream: true option to correctly handle partial characters.

Comment thread src/models/openai.ts
let finishReason: 'stop' | 'length' | 'tool_call' = 'stop';

for await (const chunk of res.body as AsyncIterable<Buffer>) {
buffer += chunk.toString('utf8');
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Using chunk.toString('utf8') on stream chunks can lead to character corruption if a multi-byte UTF-8 character is split across chunk boundaries. It is recommended to use TextDecoder with the stream: true option to correctly handle partial characters.

Comment thread src/cli/progress.ts
// render a partial code block as markdown, it'll mangle. Counts triple
// backticks at line starts; odd count = open fence.
const hasOpenFence = (text: string): boolean => {
let count = 0;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The hasOpenFence function only checks for triple backticks (```). Markdown also supports tildes (~~~) as code fence markers. The regex should be updated to include both to ensure correct state tracking during streaming.

Suggested change
let count = 0;
if (/^\s*(?:```|~~~)/.test(line)) count++;

Removed table of demo links and replaced with video links.
Replaced video elements with links to external video files.
@hoangsonww hoangsonww merged commit e447ac6 into master Apr 24, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation enhancement New feature or request feature Feature request good first issue Good for newcomers question Further information is requested

Projects

Development

Successfully merging this pull request may close these issues.

1 participant